Fluent Assertions Documentation
FluentAssertions.Equivalency Namespace / EquivalencyOptions<TExpectation> Class / WithMapping Method / WithMapping<TSubject>(Expression<Func<TExpectation,Object>>,Expression<Func<TSubject,Object>>) Method
A field or property expression indicating the (nested) member to map from.
A field or property expression indicating the (nested) member to map to.
In This Topic
    WithMapping<TSubject>(Expression<Func<TExpectation,Object>>,Expression<Func<TSubject,Object>>) Method
    In This Topic
    Maps a (nested) property or field of type TExpectation to a (nested) property or field of TSubject using lambda expressions.
    Syntax

    Parameters

    expectationMemberPath
    A field or property expression indicating the (nested) member to map from.
    subjectMemberPath
    A field or property expression indicating the (nested) member to map to.

    Type Parameters

    TSubject
    Remarks
    The members of the subject and the expectation must have the same parent. Also, indexes in collections are ignored. If the types of the members are different, the usual logic applies depending or not if conversion options were specified. Fields can be mapped to properties and vice-versa.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also